<?php
require_once 'db_conn.php';
header("content-type:text/html;charset=utf-8");
$username = $_POST["username"];
$password = $_POST["password"];
$password = md5("password");
$login_time = time();
echo "<pre>";
print_r($_POST);

$sql = "
INSERT INTO  user (
uid ,
username ,
password ,
login_time
)
VALUES (
NULL ,  '$username',  '$password',  '$login_time'
);";
echo "<pre>";
print_r($sql);

$result = $conn->query($sql);
if($result===false){
    echo "数据库操作失败！";
}else{
    header("Location:register.html");
}